package com.fishleap.enumeration;

/**
 * @author zlg
 */
public enum RpcResponseCode {

    SUCCESS(200,"调用方法成功"),
    SUCCESS_CONNECT(200,"客户端与上线的服务端重新建立连接"),
    FAIL(500,"调用方法失败"),
    NOT_FOUND_MENTHOD(500,"未找到指定方法"),
    NOT_FOUND_CLASS(500,"未找到指定类"),
    FAIL_DISCONNECT(500,"客户端与下线的服务端断开连接");

    private final int code;
    private final String message;


    RpcResponseCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "RpcResponseCode{" +
                "code=" + code +
                ", message='" + message + '\'' +
                '}';
    }
}
